package 线程的状态;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石方旭
 * Date: 2022-09-22
 * Time: 16:14
 */

class MyRunnable implements Runnable{
    @Override
    public void run() {
        System.out.println("我使用普通类实现Runnable接口来创建线程");
    }
}
public class ThreadDemo3 {
    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();
        Thread t = new Thread(myRunnable);
        t.start();
    }
}
